package com.example.demo.test3.controller;


import com.example.demo.test3.mapper.ITest3Mapper;
import com.example.demo.test3.entity.Test3;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author thz
 * @since 2021-03-19
 */
@RestController
@RequestMapping("/test3/")
public class Test3Controller {
    @Autowired
    private ITest3Mapper test3Mapper;
    @GetMapping("testIn")
    @ApiOperation("保存或更新数据")
    public Boolean testIn(){
        String[] ids = new String[]{"1", "2", "3"};
        Map<String, Object> params = new HashMap<>();
        params.put("ids", ids);
        params.put("item1", "2");
        List<Test3> byIds = test3Mapper.getByIds(params);
        System.out.println(byIds);
        return true;
    }
}

